<?php

use yii\db\Migration;
use yii\db\Schema;
/**
 * Class m181030_084011_ADD_FIELD_COST
 */
class m181030_084011_ADD_FIELD_COST extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('{{cost}}', 'confirm', Schema::TYPE_INTEGER. "(2) NOT NULL DEFAULT '1' COMMENT '是否确认' AFTER status ");
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        echo "m181030_084011_ADD_FIELD_COST cannot be reverted.\n";

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m181030_084011_ADD_FIELD_COST cannot be reverted.\n";

        return false;
    }
    */
}
